const appAssignUserAPI = {
  queryAppList: param => {
    return $http
      .post(
        `${window.RPConfig.mgt}/application/getCurrentUserApplications?category=${param.category}&tenantCode=${param.tenantCode}`
      )
      .then(response => response.data);
  },
  queryAssignedUser: param => {
    return $http
      .post(`${window.RPConfig.mgt}/user/listUsersByApplicationCode`, param)
      .then(response => response.data);
  },
  queryUnassignedUser: param => {
    return $http
      .post(`${window.RPConfig.mgt}/user/listUsersByApplicationCode`, param)
      .then(response => response.data);
  },
  saveAssignedUser: param => {
    return $http.post(`${window.RPConfig.mgt}/application/saveApplicationUsers`, param).then(response => response.data);
  },
  deleteAssignedUser: param => {
    return $http
      .post(`${window.RPConfig.mgt}/application/delApplicationUserRelByIds`, param)
      .then(response => response.data);
  },
  // 获取第三方应用
  getThirdPartyApp: code => {
    return $http
      .get(`${window.RPConfig.setting}/valueset/vsItem/list?vsCode=${code}`, {})
      .then(response => response.data);
  }
};
export default appAssignUserAPI;
